var v1 = document.querySelector("#v1");
var v2 = document.querySelector("#v2");
var bt = document.querySelector("#bt");
var res = document.querySelector("#res");

/*require("../css/index.css");
require("../css/index2.less");*/
/*require("../css/index1.scss");
bt.addEventListener("click",function(){
	var add=require("./dev.js");
	res.value=add(+v1.value,+v2.value);
},false);*/
import "../css/index.css";
import "../css/index1.scss";
import addObj from "./dev.js";

//1.导入vue核心包
import Vue from "vue";
//2.集成vue-router文件
import VueRouter from "vue-router";
//3.将vueRouter绑定到Vue对象上
Vue.use(VueRouter);

//引入模块
import App from "../vue/demo.vue";
import login from "../vue/components/login.vue";
import register from "../vue/components/register.vue";

var router1 = new VueRouter({
    routers: [
        { path: "/", redirect: "/login", component: login },
        { path: "/login", component: login },
        { path: "/register", component: register }
    ]
})

new Vue({
    el: "#app",
    router: router1,
    render: c => c(App)
})

bt.onclick = function() {
    //var add=require("./dev.js");
    res.value = addObj.add(+v1.value, +v2.value);
}